package tools;

import view.ChatView;

import java.util.Hashtable;

/**
 * 管理全部客户端打开的的聊天界面
 */
public class ChatViewManage {

    private static Hashtable<Integer, ChatView> chatFrames = new Hashtable<>();

    public static void addChatFrame(int fqq, ChatView chat) {
        chatFrames.put(fqq, chat);
    }

    public static ChatView getChatFrame(int fqq) {
        return chatFrames.get(fqq);
    }

    public static ChatView removeChatFrame(int fqq) {
        return chatFrames.remove(fqq);
    }
}
